using Nop.Core.Domain.XJ;

namespace Nop.Data.Mapping.XJ
{
	public partial class XJEquipmentMap : NopEntityTypeConfiguration<XJEquipment>
	{
		public XJEquipmentMap()
		{
			this.ToTable("XJEquipment");
			this.HasKey(c => c.Id);

			this.Property(p => p.Name).IsRequired().HasMaxLength(50);
			this.Property(p => p.Manufacturer).HasMaxLength(50);
			this.Property(p => p.Specification).HasMaxLength(50);
			this.Property(p => p.Unit).HasMaxLength(5);

			this.HasMany(c => c.Places)
				.WithMany()
				.Map(m => m.ToTable("XJEquipment_XJPlace_Mapping"));
		}
	}
}

